package com.yanqu.road.sync.message;

import com.google.protobuf.GeneratedMessage;
import com.yanqu.road.message.YanQuMessage;


import java.time.LocalDateTime;
import java.util.concurrent.CompletableFuture;


public class ResultProcessor {

    private final long sequenceId;

    private LocalDateTime createAt;

    private CompletableFuture<SyncResponse> completableFuture = new CompletableFuture<>();

    private GeneratedMessage.Builder<?> responseBuilder;

    private YanQuMessage request;
    public ResultProcessor(long l) {
        this.sequenceId = l;
        this.createAt = LocalDateTime.now();
    }

    public long getSequenceId() {
        return this.sequenceId;
    }

    public CompletableFuture<SyncResponse> getCompletableFuture() {
        return completableFuture;
    }

    public void setCompletableFuture(CompletableFuture<SyncResponse> completableFuture) {
        this.completableFuture = completableFuture;
    }

    public LocalDateTime getCreateAt() {
        return createAt;
    }

    public void setCreateAt(LocalDateTime createAt) {
        this.createAt = createAt;
    }

    public GeneratedMessage.Builder<?> getResponseBuilder() {
        return responseBuilder;
    }

    public void setResponseBuilder(GeneratedMessage.Builder<?> responseBuilder) {
        this.responseBuilder = responseBuilder;
    }

    public YanQuMessage getRequest() {
        return request;
    }

    public void setRequest(YanQuMessage request) {
        this.request = request;
    }
}
